home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / ScriptLayout.a < prev    next >
Text File  |  1996-05-01  |  6KB  |  244 lines

  1. ;
  2. ;    File:        ScriptLayout.a
  3. ;
  4. ;    Contains:    Script Layout Interfaces
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__SCRIPTLAYOUT__') = 'UNDEFINED' THEN
  19. __SCRIPTLAYOUT__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  25.     include 'MixedMode.a'
  26.     ENDIF
  27.     IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
  28. OffPair                    RECORD 0
  29. offFirst                 ds.w    1                ; offset: $0 (0)
  30. offSecond                 ds.w    1                ; offset: $2 (2)
  31. sizeof                     EQU *                    ; size:   $4 (4)
  32.                         ENDR
  33. OffsetTable                RECORD 0
  34. elements                 ds.b    3 * OffPair.sizeof
  35. sizeof                     EQU *                    ; size:   $C (12)
  36.                         ENDR
  37.  
  38.  
  39.     ENDIF
  40.     IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
  41.  
  42.                                                             ; CharToPixel directions 
  43. leftCaret                        EQU        0                    ;Place caret for left block
  44. rightCaret                        EQU        -1                    ;Place caret for right block
  45. kHilite                            EQU        1                    ;Direction is SysDirection
  46. smLeftCaret                        EQU        0                    ;Place caret for left block - obsolete 
  47. smRightCaret                    EQU        -1                    ;Place caret for right block - obsolete 
  48. smHilite                        EQU        1                    ;Direction is TESysJust - obsolete 
  49.                                                             ;Constants for styleRunPosition argument in PortionLine, DrawJustified, MeasureJustified, CharToPixel, and PixelToChar.
  50. onlyStyleRun                    EQU        0                    ; This is the only style run on the line 
  51. leftStyleRun                    EQU        1                    ; This is leftmost of multiple style runs on the line 
  52. rightStyleRun                    EQU        2                    ; This is rightmost of multiple style runs on the line 
  53. middleStyleRun                    EQU        3                    ; There are multiple style runs on the line and this is neither the leftmost nor the rightmost. 
  54. smOnlyStyleRun                    EQU        0                    ; obsolete 
  55. smLeftStyleRun                    EQU        1                    ; obsolete 
  56. smRightStyleRun                    EQU        2                    ; obsolete 
  57. smMiddleStyleRun                EQU        3                    ; obsolete 
  58. ;  type for styleRunPosition parameter in PixelToChar etc. 
  59. ; typedef short                         JustStyleCode
  60.  
  61. FormatOrder                RECORD 0
  62. elements                 ds.w    1
  63. sizeof                     EQU *                    ; size:   $2 (2)
  64.                         ENDR
  65.  
  66.  
  67. ; typedef FormatOrder *                    FormatOrderPtr
  68.  
  69. ;  move FormatStatus to TextUtils.i 
  70. ;
  71. ; pascal short Pixel2Char(Ptr textBuf, short textLen, short slop, short pixelWidth, Boolean *leadingEdge)
  72. ;
  73.     IF ¨ GENERATINGCFM THEN
  74.         Macro
  75.         _Pixel2Char
  76.             move.l              #$820E0014,-(sp)
  77.             dc.w                $A8B5
  78.         EndM
  79.     ELSE
  80.         IMPORT_CFM_FUNCTION Pixel2Char
  81.     ENDIF
  82.  
  83. ;
  84. ; pascal short Char2Pixel(Ptr textBuf, short textLen, short slop, short offset, short direction)
  85. ;
  86.     IF ¨ GENERATINGCFM THEN
  87.         Macro
  88.         _Char2Pixel
  89.             move.l              #$820C0016,-(sp)
  90.             dc.w                $A8B5
  91.         EndM
  92.     ELSE
  93.         IMPORT_CFM_FUNCTION Char2Pixel
  94.     ENDIF
  95.  
  96. ;
  97. ; pascal short PixelToChar(Ptr textBuf, long textLength, Fixed slop, Fixed pixelWidth, Boolean *leadingEdge, Fixed *widthRemaining, JustStyleCode styleRunPosition, Point numer, Point denom)
  98. ;
  99.     IF ¨ GENERATINGCFM THEN
  100.         Macro
  101.         _PixelToChar
  102.             move.l              #$8222002E,-(sp)
  103.             dc.w                $A8B5
  104.         EndM
  105.     ELSE
  106.         IMPORT_CFM_FUNCTION PixelToChar
  107.     ENDIF
  108.  
  109. ;
  110. ; pascal short CharToPixel(Ptr textBuf, long textLength, Fixed slop, long offset, short direction, JustStyleCode styleRunPosition, Point numer, Point denom)
  111. ;
  112.     IF ¨ GENERATINGCFM THEN
  113.         Macro
  114.         _CharToPixel
  115.             move.l              #$821C0030,-(sp)
  116.             dc.w                $A8B5
  117.         EndM
  118.     ELSE
  119.         IMPORT_CFM_FUNCTION CharToPixel
  120.     ENDIF
  121.  
  122. ;
  123. ; pascal void DrawJustified(Ptr textPtr, long textLength, Fixed slop, JustStyleCode styleRunPosition, Point numer, Point denom)
  124. ;
  125.     IF ¨ GENERATINGCFM THEN
  126.         Macro
  127.         _DrawJustified
  128.             move.l              #$80160032,-(sp)
  129.             dc.w                $A8B5
  130.         EndM
  131.     ELSE
  132.         IMPORT_CFM_FUNCTION DrawJustified
  133.     ENDIF
  134.  
  135. ;
  136. ; pascal void MeasureJustified(Ptr textPtr, long textLength, Fixed slop, Ptr charLocs, JustStyleCode styleRunPosition, Point numer, Point denom)
  137. ;
  138.     IF ¨ GENERATINGCFM THEN
  139.         Macro
  140.         _MeasureJustified
  141.             move.l              #$801A0034,-(sp)
  142.             dc.w                $A8B5
  143.         EndM
  144.     ELSE
  145.         IMPORT_CFM_FUNCTION MeasureJustified
  146.     ENDIF
  147.  
  148. ;
  149. ; pascal Fixed PortionLine(Ptr textPtr, long textLen, JustStyleCode styleRunPosition, Point numer, Point denom)
  150. ;
  151.     IF ¨ GENERATINGCFM THEN
  152.         Macro
  153.         _PortionLine
  154.             move.l              #$84120036,-(sp)
  155.             dc.w                $A8B5
  156.         EndM
  157.     ELSE
  158.         IMPORT_CFM_FUNCTION PortionLine
  159.     ENDIF
  160.  
  161. ;
  162. ; pascal void HiliteText(Ptr textPtr, short textLength, short firstOffset, short secondOffset, OffsetTable offsets)
  163. ;
  164.     IF ¨ GENERATINGCFM THEN
  165.         Macro
  166.         _HiliteText
  167.             move.l              #$800E001C,-(sp)
  168.             dc.w                $A8B5
  169.         EndM
  170.     ELSE
  171.         IMPORT_CFM_FUNCTION HiliteText
  172.     ENDIF
  173.  
  174. ;
  175. ; pascal void DrawJust(Ptr textPtr, short textLength, short slop)
  176. ;
  177.     IF ¨ GENERATINGCFM THEN
  178.         Macro
  179.         _DrawJust
  180.             move.l              #$8008001E,-(sp)
  181.             dc.w                $A8B5
  182.         EndM
  183.     ELSE
  184.         IMPORT_CFM_FUNCTION DrawJust
  185.     ENDIF
  186.  
  187. ;
  188. ; pascal void MeasureJust(Ptr textPtr, short textLength, short slop, Ptr charLocs)
  189. ;
  190.     IF ¨ GENERATINGCFM THEN
  191.         Macro
  192.         _MeasureJust
  193.             move.l              #$800C0020,-(sp)
  194.             dc.w                $A8B5
  195.         EndM
  196.     ELSE
  197.         IMPORT_CFM_FUNCTION MeasureJust
  198.     ENDIF
  199.  
  200. ;
  201. ; pascal Fixed PortionText(Ptr textPtr, long textLength)
  202. ;
  203.     IF ¨ GENERATINGCFM THEN
  204.         Macro
  205.         _PortionText
  206.             move.l              #$84080024,-(sp)
  207.             dc.w                $A8B5
  208.         EndM
  209.     ELSE
  210.         IMPORT_CFM_FUNCTION PortionText
  211.     ENDIF
  212.  
  213. ;
  214. ; pascal long VisibleLength(Ptr textPtr, long textLength)
  215. ;
  216.     IF ¨ GENERATINGCFM THEN
  217.         Macro
  218.         _VisibleLength
  219.             move.l              #$84080028,-(sp)
  220.             dc.w                $A8B5
  221.         EndM
  222.     ELSE
  223.         IMPORT_CFM_FUNCTION VisibleLength
  224.     ENDIF
  225.  
  226. ;
  227. ; pascal void GetFormatOrder(FormatOrderPtr ordering, short firstFormat, short lastFormat, Boolean lineRight, StyleRunDirectionUPP rlDirProc, Ptr dirParam)
  228. ;
  229.     IF ¨ GENERATINGCFM THEN
  230.         Macro
  231.         _GetFormatOrder
  232.             move.l              #$8012FFFC,-(sp)
  233.             dc.w                $A8B5
  234.         EndM
  235.     ELSE
  236.         IMPORT_CFM_FUNCTION GetFormatOrder
  237.     ENDIF
  238.  
  239.     IF OLDROUTINENAMES THEN
  240.     ENDIF
  241.     ENDIF
  242.     ENDIF ; __SCRIPTLAYOUT__ 
  243.  
  244.